Package net.mitza.odata.builder.function

Source Code of net.mitza.odata.builder.function.CustomMetaKeyBuilder

package net.mitza.odata.builder.function;

import java.util.List;

import net.mitza.odata.parser.FieldOperatorNode;
import net.mitza.odata.parser.ParametersExpression;

import com.tridion.broker.querying.criteria.FieldOperator;
import com.tridion.broker.querying.criteria.metadata.CustomMetaKeyCriteria;

/**
* @author Mihai Cadariu
*/
public class CustomMetaKeyBuilder extends FunctionBuilder {

  public CustomMetaKeyBuilder(ParametersExpression parametersExpression) {
    build(parametersExpression);
  }

  @Override
  public void build(ParametersExpression parametersExpression) {
    List<FieldOperatorNode> fieldOperatorNodes = parametersExpression.getFieldOperatorNodes();
    String keyName = fieldOperatorNodes.get(0).getValue();
    FieldOperator operator = fieldOperatorNodes.get(0).getFieldOperator();
    criteria = new CustomMetaKeyCriteria(keyName, operator);
  }
}
TOP

Related Classes of net.mitza.odata.builder.function.CustomMetaKeyBuilder

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.